home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / pixie.cpt / Pixie Scheme ƒ / PixieScheme.rsrc / STR#_137.txt < prev    next >
Encoding:
Text File  |  1991-01-07  |  5.7 KB  |  117 lines

  1. Compile Procedures
  2.  
  3. To Compile Procedures:
  4.  
  5.     The procedure "e::compile-form" compiles any Pixie Scheme object and returns the compiled value of that object.  You might use it as "(define bar (e::compile-form foo))", where "foo" evaluates to something to be compiled.
  6.  
  7.     "E::compile-form" does actual compilation only when its argument evaluates to a lambda expression.  It returns all other Pixie Scheme objects unchanged.
  8.  
  9.     If "Compile Defines", in the "Options" menu, is checked, Pixie Scheme will automatically compile the second arguments of all "define"s:  You need not use "e::compile-form" with "define", if that item is checked.
  10.  
  11. Enter Source Code
  12.  
  13. To enter source code:
  14.  
  15.  
  16.     Use the "load" procedure to load a file, or select the "Load FileΓǪ" or "Insert FileΓǪ" menu item from the "File" menu.
  17.  
  18.     Or use a textΓÇôediting desk accessory, or a full textΓÇôeditor (under MultiFinder) to create source code, and then "Cut" and "Paste" it into Pixie Scheme.
  19.  
  20.     Or just type directly into Pixie Scheme.  You can save your work later with the "Save SelectionΓǪ" command from the "File" menu.
  21.  
  22. Evaluate Expressions
  23.  
  24. To evaluate one or more expressions:
  25.  
  26.  
  27.     Select the expressions with the mouse, then choose "Evaluate" from the "Commands" menu, or press the "Enter" key, or hold down the "Command" key while you press the "Return" key.
  28.  
  29.  
  30.     As a short cut, if nothing is selected, these commands will select the entire line the cursor is on, and evaluate it.
  31.  
  32.  
  33.  
  34. Inspect a Scheme Object
  35.  
  36. To learn more about a Scheme object:
  37.  
  38.     You might use the "e::inspect" procedure, which evaluates its argument, displays information about it, and returns the evaluated argument.
  39.  
  40.     This procedure is available in the "Commands" menu:  Mark the object with the mouse first.  One menu item automatically quotes what is marked; the other does not.  Both act on the whole line if nothing is marked.
  41.  
  42.  
  43.     "E::inspect" works well within programs, or with one of the topΓÇôlevel loop variables as its argument.  (See the menu item for "Learn What Just Happened".)
  44.  
  45. Learn What Just Happened
  46.  
  47. To find out what just happened:
  48.  
  49.     At any time, the variable "┬▒" (optionΓÇôplus) is bound to the last topΓÇôlevel expression evaluated, "┬▒┬▒" to the next to last, and "┬▒┬▒┬▒" to the third from last.  Evaluate one to recover an expression.
  50.  
  51.     Similarly, "┬░" (optionΓÇôasterisk) is bound to the last result returned to topΓÇôlevel, "┬░┬░" to the next to last, and "┬░┬░┬░" to the third from last.  Evaluate or inspect one to recover a result, or to learn more about it.
  52.  
  53.     Furthermore, "ΓÇô" (optionΓÇôminus) is bound to the form then being evaluated (if any).
  54.  
  55.     These variables are called "topΓÇôlevel loop variables".
  56.  
  57. Record What You Do
  58.  
  59. To record your interaction with Pixie Scheme in a file:
  60.  
  61.  
  62.     Use the "transcript-on" procedure to record every expression you evaluate, and everything Pixie Scheme prints in response, in a file.
  63.  
  64.  
  65.     Call "transcript-on" with an argument that is the name of the file you wish to use, as a string.  If you use no argument, "transcript-on" will open a dialog box for file selection.
  66.  
  67.  
  68.     The "transcript-off" procedure will close any open transcript file.
  69.  
  70. Report a Bug
  71.  
  72. Send bug reports to:
  73.  
  74.  
  75.                Jay Reynolds Freeman
  76.                P. O. Box 60628
  77.                Palo Alto, CA, 94306-0628, USA
  78.  
  79.  
  80.     Give as much information as you can, including the type of Macintosh you were using, the version of Apple System Software, and any message Pixie Scheme may have printed out.
  81.  
  82.  
  83.     There is more information about identifying and reporting bugs in the HyperCard help stack that accompanies Pixie Scheme.
  84.  
  85. Save Your Work
  86.  
  87. To save work done in Pixie Scheme:
  88.  
  89.     The "Save WorldΓǪ" item from the "File" menu will write out all the contents of Pixie Scheme's memory to a file, which can be reloaded later with the "Load WorldΓǪ" command, also from the "File" menu.
  90.  
  91.     If you wish, you may use the procedures "e::save-world" and "e::load-world" instead.  Each takes the name of a file, as a string, for an argument, or else opens a dialog box if there is no argument.
  92.  
  93.     Loading a world will overwrite the entire contents of Pixie Scheme's memory, so be cautious about doing it.
  94.  
  95.     "Save SelectionΓǪ", from the "File" menu, saves marked text to a file.  Or just "Cut" and "Paste" it to a text editor.
  96.  
  97. Trace Procedure Calls
  98.  
  99. To trace procedure calls:
  100.  
  101.     A documented Scheme source code file, "Trace.s", should have accompanied Pixie Scheme.  Its contents will allow you to trace procedure calls, and to show what arguments they are called with and what values they return.
  102.  
  103.     You might want to read the file before using it.  In any case, load the file and then use the procedures "trace" and "untrace".  (There are some other procedures, but these two are the basic ones.)
  104.  
  105.     "Trace" takes three arguments ΓÇö a symbol (naming a procedure you want to trace), a boolean to tell whether you want to see the arguments, and a boolean to tell whether you want to see the result.  "Untrace" just takes a symbol.
  106.  
  107. Use the Help Stack
  108.  
  109. There is a HyperCard help stack:
  110.  
  111.     A HyperCard help stack, "Pixie Scheme Help", should have accompanied Pixie Scheme.  I hope you find it worth reading.  It contains lots of information that was too complicated to put into the "Help" menu.
  112.  
  113.     I hope you have HyperCard.  Its linkΓÇôbrowsing, graphics and customizable search facilities make a help stack much more useful than mere text.  And surely, HyperCard is more widespread than any single wordΓÇôprocessor.
  114.  
  115.     If you have MultiFinder and lots of memory, or perhaps a special desk accessory, you can use the help stack while running Pixie Scheme.  Or if you print the help stack, the cards will come out in a readable order.
  116.  
  117.